package com.tm.chargecar.controller;

import com.tm.chargecar.entity.ElectronicCardEntity;
import com.tm.chargecar.result.Result;
import com.tm.chargecar.service.ElectronicCardService;
import com.tm.chargecar.vo.ElectronicCardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 该死了
 * @create 2022-08-24 9:39
 */
@RestController
@RequestMapping("electronicCardController")
public class ElectronicCardController {
    @Autowired
    private ElectronicCardService electronicCardService;
   //普通查询以及条件查询
    @GetMapping("query")
    public Result electronicCardQuery(ElectronicCardVo electronicCardVo){

        return electronicCardService.electronicCardQuery(electronicCardVo);
    }
    //新增电子卡类型
    @PostMapping("add")
    public Result electronicCardAdd(@RequestBody ElectronicCardEntity electronicCardEntity){
        return electronicCardService.electronicCardAdd(electronicCardEntity);
    }
}
